﻿<Window x:Class="AdTech.Snap.DropboxUIDExtractor"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:cmn="http://adtech-dev.com/Common"
        xmlns:local="clr-namespace:AdTech.Snap"
        Title="Dropbox User ID Extractor" Width="330" Height="235"
        ResizeMode="NoResize" WindowStartupLocation="CenterScreen"
        Background="Transparent" cmn:WindowIconHelper.ShowWindowIcon="False"
        cmn:Common.DialogResult="{Binding DialogResult}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="..\Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <local:DropboxUIDConverter x:Key="DropboxUIDConverter" />
        </ResourceDictionary>
    </Window.Resources>
    <cmn:AttachedCommandBehaviour.Bindings>
        <cmn:AttachedCommandBinding Command="{Binding LoadedCommand}" Event="Loaded" />
        <cmn:AttachedCommandBinding Command="{Binding ClosingCommand}" Event="Closing" />
        <cmn:AttachedCommandBinding Command="{Binding CloseCommand}" KeyGesture="ESC" />
        <cmn:AttachedCommandBinding Command="{Binding SaveCommand}" KeyGesture="ENTER" />
    </cmn:AttachedCommandBehaviour.Bindings>
    <DockPanel>
        <Border Name="border" DockPanel.Dock="Bottom" Style="{StaticResource glassAreaStyle}">
            <DockPanel>
                <Button Command="{Binding SaveCommand}" Width="70" HorizontalAlignment="Left">OK</Button>
                <Label Content="{Binding DropboxUID, Converter={StaticResource DropboxUIDConverter}}"
                       Style="{StaticResource DropShadowGlassText}" Margin="0,0,15,0"
                       HorizontalAlignment="Right" VerticalAlignment="Center" />
            </DockPanel>
        </Border>
        <Border Padding="5" Background="{StaticResource bgGradBlue}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Image Source="/Snap;component/Resources/dropbox.png" VerticalAlignment="Top" Width="50" />
                <TextBlock VerticalAlignment="Top" TextWrapping="Wrap" HorizontalAlignment="Center" Padding="5,0,0,0" Grid.Column="1"
                           Text="{Binding Source={x:Static local:DropboxUIDExtractorViewModel.HelpText}}" />
            </Grid>
        </Border>
    </DockPanel>
</Window>
